'''Class describing an mapfile output section'''
#!/usr/bin/env python
# -*- coding: utf-8 -*-

class OutputSection(object):
    '''Class describing an mapfile output section'''
    def __init__(self, name="", address=0, size=0, input_sections=None):
        '''Setter for name'''
        self.name = name
        self.address = address
        self.size = size
        self.input_sections = input_sections or []

    def setName(self, name):
        '''Setter for name'''
        self.name = name

    def setAddress(self, address):
        '''Setter for address'''
        self.address = address

    def setSize(self, size):
        '''Setter for section size'''
        self.size = size

    def setInputSections(self, input_sections):
        '''Setter for input sections'''
        self.input_sections = input_sections

    def addInputSection(self, input_section):
        '''Function for adding an input section to the list'''
        self.input_sections.append(input_section)
